<?php
/**
 * Created by PhpStorm.
 * User: dreamy
 * Date: 2019-05-30
 * Time: 15:36
 */
namespace common\models;

use Yii;

/**
 * This is the model class for table "tally_log".
 *
 * @property int $id 记录ID
 * @property int $tally_id 账本ID
 * @property string $username 操作人
 * @property string $content 日志内容
 * @property int $uid 操作者
 * @property int $type 操作类型
 * @property string $created_time 创建时间
 * @property string $updated_time 更新时间
 */
class TallyLog extends \yii\db\ActiveRecord
{

    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'tally_log';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['uid','tally_id' ,'type'], 'integer'],
            [['uid','type','content'], 'required'],
            [['created_time', 'updated_time'], 'safe'],
            [['username'], 'string', 'max' => 60],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'username' => 'Username',
            'uid' => 'Uid',
            'type' => 'Type',
            'tally_id' => 'TallyId',
            'content' => 'Content',
            'created_time' => 'Created Time',
            'updated_time' => 'Updated Time',
        ];
    }

}
